package com.gmlive.common.okhttpquality;

import com.gmlive.common.okhttpquality.internal.IkOkHttpMonitor;
import com.google.gson.annotations.SerializedName;

/**
 * @作者: 姜志敏
 * @日期: 2019-08-17
 */
public abstract class IkOkHttpQualityReporter implements IkOkHttpQualityInterceptor.QualityCallback {

    @Override
    public void onAccept(IkOkHttpMonitor monitor) {
        if(monitor != null){
            onCallback(monitor);
        }
    }

    protected abstract void onCallback(IkOkHttpMonitor monitor);

    /**
     * 映客api请求返回的基础信息
     */
    public static class IkApi {
        @SerializedName("dm_error")
        private int errorCode;
        @SerializedName("error_msg")
        private String errorMessage;

        public int getCode() {
            return errorCode;
        }

        public void setCode(int errorCode) {
            this.errorCode = errorCode;
        }

        public String getMessage() {
            return errorMessage;
        }

        public void setMessage(String errorMessage) {
            this.errorMessage = errorMessage;
        }

    }
}
